package game.controller
{
	import flash.utils.Dictionary;

	/**
	 * 游戏主控制器
	 * @author xiezhicheng
	 */
	public class GameCenter extends BaseCenter
	{
		private static var _instance:GameCenter;

		public function GameCenter()
		{
			if (_instance == null) 
			{
				super();
				init();
				_instance = this;
			}else{
				throw new Error("GameController is single instance");
			}
			
		}
		
		
		/**
		 * 创建实例
		 * @return 
		 */
		public static function getInstance():GameCenter{
			if (_instance == null) 
			{
				_instance = new GameCenter();	
			}
			return _instance;
		}
		
		
		private function init():void
		{
			initControllers();
			
			
		}
		
		/**
		 * 初始化所有控制器
		 * */
		public function initControllers():void
		{
			/**登录控制器*/
			LoginCenter.getInstance();
			/**场景控制器*/
			SceneCenter.getInstance();
			/**菜单控制器*/
			MenuCenter.getInstance();
			/**主界面控制器*/
			MainUICenter.getInstance();
		}
	}
}